import common from './common'

const dynamicConfigService = {}

const path = {
  getOrgRelateConfig: 'app/dynamic/config/orgRelate/get',
  saveOrgRelateConfig: 'app/dynamic/config/orgRelate/save',
  delOrgRelateConfig: 'app/dynamic/config/orgRelate/delete',
  delOrgRelateGroupConfig: 'app/dynamic/config/orgRelate/group/delete'
};

(function (service) {
  service.getOrgRelateConfig = function () {
    return common.get(path.getOrgRelateConfig)
  }
  service.saveOrgRelateConfig = function (data) {
    return common.post(path.saveOrgRelateConfig, {}, data)
  }
  service.delOrgRelateConfig = function (params) {
    return common.get(path.delOrgRelateConfig, params)
  }
  service.delOrgRelateGroupConfig = function (params) {
    return common.get(path.delOrgRelateGroupConfig, params)
  }
})(dynamicConfigService)

export default dynamicConfigService
